<?php
/**
 * Created by PhpStorm.
 * User: ZhangWei
 * Date: 2018/3/12
 * Time: 10:43
 */

namespace App\Helpers;


class UserBuyStatus
{
    protected $isShow;
    protected $isBuy;
    protected $isAdmin;
    protected $isSubscribe;
    protected $isVip;
    protected $itemType;
    protected $actionType;

    public function __construct($isShow, $isBuy, $isAdmin, $isSubscribe, $isVip, $itemType, $actionType)
    {
        $this->isShow = $isShow;
        $this->isBuy = $isBuy;
        $this->isAdmin = $isAdmin;
        $this->isSubscribe = $isSubscribe;
        $this->isVip = $isVip;
        $this->itemType = $itemType;
        $this->actionType = $actionType;
    }

    public static function make($isShow, $isBuy, $isAdmin, $isSubscribe, $isVip, $itemType, $actionType)
    {
        return new static($isShow, $isBuy, $isAdmin, $isSubscribe, $isVip, $itemType, $actionType);
    }

    /**
     * @return mixed
     */
    public function getIsShow()
    {
        return $this->isShow;
    }

    /**
     * @param mixed $isShow
     */
    public function setIsShow($isShow)
    {
        $this->isShow = $isShow;
    }


    /**
     * @return mixed
     */
    public function getIsBuy()
    {
        return $this->isBuy;
    }

    /**
     * @param mixed $isBuy
     */
    public function setIsBuy($isBuy)
    {
        $this->isBuy = $isBuy;
    }

    /**
     * @return mixed
     */
    public function getIsAdmin()
    {
        return $this->isAdmin;
    }

    /**
     * @param mixed $isAdmin
     */
    public function setIsAdmin($isAdmin)
    {
        $this->isAdmin = $isAdmin;
    }


    /**
     * @return mixed
     */
    public function getIsSubscribe()
    {
        return $this->isSubscribe;
    }

    /**
     * @param mixed $isSubscribe
     */
    public function setIsSubscribe($isSubscribe)
    {
        $this->isSubscribe = $isSubscribe;
    }

    /**
     * @return mixed
     */
    public function getItemType()
    {
        return $this->itemType;
    }

    /**
     * @param mixed $itemType
     */
    public function setItemType($itemType)
    {
        $this->itemType = $itemType;
    }

    /**
     * @return mixed
     */
    public function getActionType()
    {
        return $this->actionType;
    }

    /**
     * @param mixed $actionType
     */
    public function setActionType($actionType)
    {
        $this->actionType = $actionType;
    }

    /**
     * @return mixed
     */
    public function getIsVip()
    {
        return $this->isVip;
    }

    /**
     * @param mixed $isVip
     */
    public function setIsVip($isVip)
    {
        $this->isVip = $isVip;
    }


    public function toArray()
    {
        return [
            'is_buy' => $this->getIsBuy(),
            'is_show' => $this->getIsShow(),
            'is_admin' => $this->getIsAdmin(),
            'is_subscribe' => $this->getIsSubscribe(),
            'is_vip' => $this->getIsVip(),
            'item_type' => $this->getItemType(),
            'action_type' => $this->getActionType()
        ];
    }


}